package com.jspxcms.plug.domain;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by yuanyue on 14-9-20.
 */

@Entity
@Table(name = "plug_user_favorite")
public class UserFavorite implements Serializable {

    private Integer id;
    private Integer newsId;
    private String newsTitle;
    private Integer newsTypeId;
    private Integer userId;
    private Date creationDate;
    private Integer typeId;

    @Id
    @Column(name = "f_id",nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "f_news_id",nullable = true)
    public Integer getNewsId() {
        return newsId;
    }

    public void setNewsId(Integer newsId) {
        this.newsId = newsId;
    }

    @Column(name = "f_news_type_id",nullable = true)
    public Integer getNewsTypeId() {
        return newsTypeId;
    }

    public void setNewsTypeId(Integer newsTypeId) {
        this.newsTypeId = newsTypeId;
    }

    @Column(name = "f_user_id",nullable = true)
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Column(name = "f_creation_date",nullable = true)
    @Temporal(TemporalType.TIMESTAMP)

    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    @Column(name = "f_type_id",nullable = true)
    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    @Column(name = "f_news_title",nullable = true)
    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle;
    }
}
